package kr.saeildamil.androidstudy.ch17;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;

public class AddAct extends Activity {
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		
		Intent intent = getIntent();
		int lValue = Integer.parseInt(intent.getStringExtra("lValue"));
		int rValue = Integer.parseInt(intent.getStringExtra("rValue")); 
		
		int result = lValue + rValue;
		
		Intent resIntent = new Intent();
		resIntent.putExtra("AddResult", result);
		setResult(RESULT_OK, resIntent);
		finish();
	}

}
